package com.e.dianshang.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;

import javax.persistence.*;
import java.io.Serializable;
import java.sql.Timestamp;

/**
 * @Description: TOOD
 * @ClassName: Ticket
 * @Author: ${陈柯宇}
 * Date: 2020/11/9 17:08
 * @Version: 1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
//优惠券表
@Table(name = "tb_ticket")
public class Ticket implements Serializable {

    @Id
    @Column(name = "tkt_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    //优惠券名称
    @Column(name = "tkt_name")
    private String name;

    //优惠券图片地址
    @Column(name = "tkt_img")
    private String img;

    //优惠券详细信息
    @Column(name = "tkt_desc")
    private String desc;

    //优惠券详细信息
    @Column(name = "tkt_role")
    private String role;

    //优惠券优惠金额
    @Column(name = "tkt_money")
    private String money;

    //优惠券过期时间
    @Column(name = "tkt_outDate")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" ,timezone="GMT+8")
    private Timestamp outDate;

    //品牌的唯一id
    @Column(name = "tkt_brand_id")
    private Integer bid;

    //商家的唯一id
    @Column(name = "tkt_s_id")
    private Integer sid;

    //优惠券上架状态
    @Column(name = "tkt_state")
    private Boolean state;
}
